package jobs.job3.classloaderdemo.user.algorithm;

import jobs.job3.classloaderdemo.server.standard.serializer.IOSerializer;
import jobs.job3.classloaderdemo.server.standard.serializer.SerializerImp;
import jobs.job3.classloaderdemo.server.standard.Task;

import java.util.Arrays;

public class MySortTask extends Task<int[], int[]> {

    @Override
    public int[] algorithm(int[] input) {
        System.out.println("排序中...");
        System.out.println("排序前:" + Arrays.toString(input));

        Arrays.sort(input);

        System.out.println("排序后:" + Arrays.toString(input));
        return input;
    }

    @Override
    public IOSerializer<int[], int[]> getSerializer() {
        return new SerializerImp<>();
    }
}



